<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
    <head>
        {% block head %}
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>{% block title %}{{ SITENAME }}{% endblock %}</title>
        <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}">
        <!--[if lte IE 8]>
        <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/grids-responsive-old-ie-min.css">
        <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/side-menu-old-ie.css">
        <![endif]-->
        <!--[if gt IE 8]><!-->
        <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/grids-responsive-min.css">
        <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/side-menu.css">
        <!--<![endif]-->
        <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/pygments.css">
        <link rel="shortcut icon" type="image/x-icon" href="{{ SITEURL }}/favicon.ico">
        {% if FEED_ALL_ATOM %}
        <link rel="alternate" type="application/atom+xml" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" title="{{ SITENAME }} Atom Feed">
        {% endif %}
        {% if FEED_ALL_RSS %}
        <link rel="alternate" type="application/rss+xml" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" title="{{ SITENAME }} RSS Feed">
        {% endif %}
        <!--[if IE]>
        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        <script>
        (adsbygoogle = window.adsbygoogle || []).push({
            google_ad_client: "ca-pub-9432205671574187",
            enable_page_level_ads: true
        });
        </script>
        <meta name="keywords" content="Linux, 自由软件, 新闻, 教程，提示">
        <meta name="description" content="{% block meta_desc %}致力于提供 Linux 相关资讯的专题站点{% endblock %}">
        <meta name="subject" content="Linux 新闻、应用及提示">
        {% endblock %}
    </head>
    <body>
        <div id="layout" class="pure-g">
            <div class="sidebar pure-u-1">
                <div class="header">
                    <a id="menuLink" class="menu-link" href="#menu"><span></span></a>
                    <div id="menu" class="pure-menu">
                        <a class="pure-menu-heading" href="{{ SITEURL }}/" title="{{ SITENAME }}">{{ SITENAME }}</a>
                        <ul class="pure-menu-list">
                            {% if MENUITEMS_BEFORE %}
                            {% for title, link in MENUITEMS_BEFORE %}
                            <li class="pure-menu-item">
                                <a class="pure-menu-link" href="{{ link }}" title="{{ title }}">{{ title }}</a>
                            </li>
                            {% endfor %}
                            {% endif %}

                            {% if DISPLAY_PAGES_ON_MENU -%}
                            {% for pg in pages|sort(attribute='page_order') %}
                            <li class="pure-menu-item{% if pg == page %} pure-menu-selected{% endif %}">
                                <a class="pure-menu-link" href="{{ SITEURL }}/{{ pg.url }}" title="{{ pg.title }}">{{ pg.title }}</a>
                            </li>
                            {% endfor %}
                            {% endif %}

                            {% if MENUITEMS_AFTER %}
                            {% for title, link in MENUITEMS_AFTER %}
                            <li class="pure-menu-item">
                                <a class="pure-menu-link" href="{{ link }}" title="{{ title }}">{{ title }}</a>
                            </li>
                            {% endfor %}
                            {% endif %}
                        </ul>
                    </div>
                </div>
            </div>

            {% block content %}
            {% endblock %}

            {% include 'rightside.html' %}
        </div>

        <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/zepto.min.js"></script>
        <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/ui.js"></script>
        <script>
            Zepto(function($){
                $('table').addClass('pure-table pure-table-bordered');
            });
        </script>
        <script id="dsq-count-scr" src="//{{ DISQUS_SITENAME }}.disqus.com/count.js" async></script>
        {% include 'google_analytics.html' %}
        {% include 'swiftype.html' %}
    </body>
</html>
